package com.hx.er.service.admin.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.hx.er.bean.base.FoodBean;
import com.hx.er.bean.base.FoodTemplateBean;
import com.hx.er.bean.base.LabelBean;
import com.hx.er.bean.base.RestraurantBean;
import com.hx.er.bean.detail.FoodDetailBean;
import com.hx.er.bean.detail.FoodTemplateDetailBean;
import com.hx.er.bean.detail.LabelDetailBean;
import com.hx.er.dao.IFoodDao;
import com.hx.er.dao.IFoodTemplateDao;
import com.hx.er.dao.IRestraurantDao;
import com.hx.er.service.admin.IAdminFoodService;
import com.hx.er.service.base.ErBaseService;

public class AdminFoodServiceImpl extends ErBaseService implements IAdminFoodService {

	@Autowired
	private IFoodDao foodDao;

	@Autowired
	private IFoodTemplateDao foodTemplateDao;

	@Autowired
	private IRestraurantDao restDao;

	@Override
	public List<FoodBean> getFoodAliveList(Map<String, Object> conditions) {
		return this.foodDao.getFoodAliveList(conditions);
	}

	@Override
	public void insertFoodWithoutId(FoodBean foodBean) {
		this.foodDao.insertFoodWithoutId(foodBean);
	}

	@Override
	public int getFoodAliveCount(Map<String, Object> conditions) {
		return this.foodDao.getFoodAliveCount(conditions);
	}

	@Override
	public FoodDetailBean getFoodAliveById(long foodId) {
		return this.foodDao.getFoodAliveById(foodId);
	}

	@Override
	public int deleteFood(FoodBean foodBean) {
		return this.foodDao.deleteFood(foodBean);
	}

	@Override
	public int updateFood(FoodBean foodBean) {
		return this.foodDao.updateFood(foodBean);
	}

	@Override
	public RestraurantBean getRestById(long restId) {
		return this.restDao.getRestById(restId);
	}

	@Override
	public List<FoodTemplateBean> getFoodTemplateAliveList(Map<String, Object> conditions) {
		return this.foodTemplateDao.getFoodTemplateAliveList(conditions);
	}

	@Override
	public FoodTemplateDetailBean getFoodTemplateAliveById(long foodTemplateId) {
		return this.foodTemplateDao.getFoodTemplateAliveById(foodTemplateId);
	}

	@Override
	public int getFoodTemplateAliveCount(Map<String, Object> conditions) {
		return this.foodTemplateDao.getFoodTemplateAliveCount(conditions);
	}

	@Override
	public void insertFoodTemplateWithoutId(FoodTemplateBean foodTemplateBean) {
		this.foodTemplateDao.insertFoodTemplateWithoutId(foodTemplateBean);
	}

	@Override
	public int deleteFoodTemplate(FoodTemplateBean foodTemplateBean) {
		return this.foodTemplateDao.deleteFoodTemplate(foodTemplateBean);
	}

	@Override
	public int updateFoodTemplate(FoodTemplateBean foodTemplateBean) {
		return this.foodTemplateDao.updateFoodTemplate(foodTemplateBean);
	}

	@Override
	public List<RestraurantBean> getRestList(Map<String, Object> conditions) {
		return this.restDao.getRestList(conditions);
	}

	@Override
	public List<LabelDetailBean> getLabelDetailAliveList(Map<String, Object> conditions) {
		return this.foodDao.getLabelDetailAliveList(conditions);
	}

	@Override
	public int deleteLabel(LabelBean labelBean) {
		return this.foodDao.deleteLabel(labelBean);
	}

	@Override
	public int updateLabel(LabelBean labelBean) {
		return this.foodDao.updateLabel(labelBean);
	}

	@Override
	public int updateLabelSort(LabelBean labelBean) {
		return this.foodDao.updateLabelSort(labelBean);
	}

	@Override
	public int getLabelDetailAliveCount(Map<String, Object> conditions) {
		return this.foodDao.getLabelDetailAliveCount(conditions);
	}

	@Override
	public void insertLabelWithoutId(LabelBean labelBean) {
		this.foodDao.insertLabelWithoutId(labelBean);
	}

	@Override
	public LabelDetailBean getLabelDetailAliveById(long labelId) {
		return this.foodDao.getLabelDetailAliveById(labelId);
	}

}
